﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Xml.Serialization;


namespace AMebooking.NetUtils
{
    public class Utils
    {
        public static string UppercaseFirst(string s)
        {
            // Check for empty string.
            if (string.IsNullOrEmpty(s))
            {
                return string.Empty;
            }
            // Return char and concat substring.
            return char.ToUpper(s[0]) + s.Substring(1);
        }

        public static string DefaultIfBlank(bool condition, string Value, string Default)
        {
            if (condition)
            {
                return Default;
            }
            else
            {
                return Value;
            }
        }
        public static DateTime? DateTimeIfNull(Boolean condition, DateTime? Default, DateTime? Value)
        {
            if (condition)
            {
                return Default;
            }
            else
            {
                return Value;
            }
        }
       
    }
}